{% extends "templates/base.html" %}

{% block title%}Home{% endblock %}

{% block main %}


<table>
	<tr>
		<th>Ride</th>
		<th>Date</th>
		<th>Seats</th>
		<th>Owner</th>
	</tr>
	{% for ride in rides %}
	<tr class="row-a">
		<td><a href="/rideoffer?id={{ride.key.id}}">{{ride.source.name}} - {{ride.destination.name}}</a></td>
		<td>{{ride.date}}</td>
		<td>{{ride.available_seats}}</td>
		<td><a href ="/profile?user={{ride.owner.key.id}}">{{ride.owner.user.email|local_part_from_email }}</a></td>
	</tr>
	{% endfor %}


</table>

{% endblock %}